{% load ts_extras %}
<div class="treeview-lv1">
    <div class="collapsed treeview-header">
        <h4>Factor list</h4>
        <a class="expand" href="#" title="expand" ></a>
        <a class="collap" href="#" title="collap" ></a>
    </div>
    <div class="expanded">
{% if request.session.ts_program.tp.factor_list %}
    <ul class="list-lv2">
    {% for f in request.session.ts_program.tp.factor_list %}
        <li>
            <div class="collapsed">
                <a title="Factor {{f.name}}" href="{% url ts.views.editFactor request.session.ts_program.tp.name|escapeUrl f.name %}" >{{f.name}}</a>
                <a class="expand" href="#" title="expand" ></a>
                <a class="collap" href="#" title="collap" ></a>
                <a id="{% url ts.views.delFactor request.session.ts_program.tp.name|escapeUrl f.name %}" rev="factor" class="delete" href="#" title="delete" ></a>
            </div>
            <div class="expanded">
            <ul>
                <li>Decay: {{f.decay_expression}}</li>
                <li>Diffusibility: {{f.diffusibility_expression}}</li>
            </ul>
            </div>
        </li>
    {% endfor%}
    </ul>
    {%else%}
    <p>No factors</p>
    {%endif%}
    </div>
</div>